<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<title>会员公司信息</title>
		<link rel="stylesheet" type="text/css" href="../../css/aui-win.css" />
		<style>
			/*设置内容区样式*/
			body {
				min-width: 320px;
			}
			#news {
				background-color: #f2f2f2;
			}
			#news ul li {
				overflow: hidden;
				background:white;
				height:110px;
			}
			#news ul li a {
				width: 100%;
				display: inline-block;
				border-bottom: 0.2px solid white;
				padding: 10px 10px;
			}
			#news ul li a.active {
				background-color: #d9e4e9;
			}
			#news ul li .userimgs {
				float: left;
				width: 90px;
				height: 90px;
				border-radius: 4px;
			}
			#news .content {
				width: 65%;
				margin-left: 100px;
				overflow: hidden;
			}
			#news .content h2, #news h2 {
				font-size: 16px;
				height: 30px;
				font-weight: 800;
				margin-bottom: 6px;
				line-height: 30px;
				
			}
			.jobTitle {
				font-size: 20px;
				height: 50px;
				margin-bottom: 6px;
				background: white;
				line-height: 50px;
				padding-left: 2.5%;
			}
			.jobTitle img {
				height: 16px;
				width: 16px;
			}
			.memberList li {
				border-bottom: 1px solid white !important;
			}
			#news .content p {
				width: 100%;
				color: #999;
				height: 50px;
				overflow: hidden;
				font-size: 14px;
				line-height: 2;
				word-wrap: break-word;
			}
			#contentBox{
				height:150px;
				line-height:110px;
				text-align:center;
				font-size:20px;
			}
			.cld_li{    
                width: 100%;
                margin-top: 15px;
                height: 130px;
            }
            .cld_li a{
                float: left;
                width: 90%;
            }
            .cld_li img{
                float: left;
                height: 90px;
                margin-top: 10px;
                width: 90px;
                margin-left: 5px;
            }
            .cld_div1{
                height: 110px;
                margin-left: 110px;
                margin-right:10%;
            }
            .cld_div1 p{
                overflow:hidden;
                text-overflow:ellipsis;
                height:40px;
                width: 90%;
                color: #808080;
                font-size: 0.8rem;
                margin: 1px 0 1px 0;

            } 
            .cld_div1 h2{
                height: 25px;
                width: 100%;
                margin-top: 10px;
                font-weight: bold;
                color: #4c4c4c;
                font-size: 1rem;
            }
            .cld_div2{
                height: 20px;
                width: 100%;
                color: #b3b3b3;
                font-size:0.8rem;
            }
            .cld_div2 span{
                display: block;
                height: 20px;
                float: left;
                background:url(../../image/my/good-serv.png) no-repeat;
                background-size: 18px 18px;
                line-height: 20px;
                padding-left: 18px;
            }
            .cld_div2 .sp1{
                background:url(../../image/my/zhiliang.png) no-repeat;
                background-size: 18px 18px;
                margin-left: 10px;
            }
            #companyListDiv{
                width: 100%;
            }

		</style>
	</head>
	<body>
	<div id="tanChu1">
		<p>数据请求失败！</p>
		<input type="button" value="确定" id="tanChu_btn1">
	</div>
    <div class="div_loding_img">
		数据加载中
	</div>
		<header class="aui-bar aui-bar-nav aui-bar-yunzo" id="aui-header">
		<a class="aui-btn aui-bar-yunzo aui-pull-left" id="back" onclick="back_go()"> <span class="aui-iconfont aui-icon-left"></span></a>
		<div class="aui-title" id="title">
			会员公司信息
		</div>
		<a class="aui-iconfont aui-icon-menu aui-pull-right"></a>
	</header>
	<div class="margin_div"></div>
		<div id="news">
			<div>
				<ul  id="txtNewsList"></ul>
			</div>
		</div>
	</body>
	<script type="text/javascript" src="../../script/jquery-1.10.2.min.js"></script>
	<script type="text/javascript" src="../../script/common.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			sTart_Stop();
			infoid=getUrlParam('infoid');
			var pagesize=5;
			var fromgroupid;
			var Post =basedata('mycompany')+'&frommid=' + infoid +'&pagesize='+pagesize+'&fromgroupid='+$groupid;
			ajaxcocRequest('../../../api/group/getmembercompanylist', 'post', Post, function(msg){
				if(msg.code ==100){
					
					var obj = $('#txtNewsList');
					if (msg.data != undefined) {
						var html = '';
						if (msg.data.length != 0) {
							 var logoStr;
                    var sttr;
                    var str="";
                    for(var i=0;i<msg.data.length;i++){
                      if(msg.data[i].n1==null){
                            logoStr= '../../image/home/busess/yunzo_def.png';
                        }
                        else{
                            logoStr=msg.data[i].n1;
                        }
                        if(msg.data[i].n11==""){
                            sttr="他（她）还没有添加公司信息！"
                        }
                        else{
                            sttr=msg.data[i].n11;
                        }
                        str+='<li class="cld_li" id="' + msg.data[i].n0 + '"><img src="'+logoStr+'"><div class="cld_div1"><h2>'+msg.data[i].n2+'</h2><p>'+sttr+'</p><div class="cld_div2"><span>'+'优质服务'+'</span><span class="sp1">'+'质量之上'+'</span></div></div></li>'; 
                    }
                    $("#txtNewsList").html(str);	
						} 
						else {
							$('#txtNewsList').html("<div style='width:20%;margin:40px 0 0 40%;'><img src='../../image/gantan.png' style='width:100%;'></div><p style='width:100%;text-align:center;margin-top:30px;color:#999;font-size:18px;'>他(她)还没有添加公司信息！</p>");
						}
					} 
					else {
					}
				}
				else{
					$("body").append('<div class="wuwang"><img src="../../image/iconfont-wangluo.png"><p>网络拥堵，信息塞车</p></div>')
				}	
			})
		})
/*		var groupid;
		var frommid;
		var mid;
		var did;
		apiready = function() {
			frommid = api.pageParam.myMid;
			api.getPrefs({
				key : 'mid'
			}, function(ret, err) {
				if (ret) {
					mid = ret.value;
				} else {
					mid = initdata.get('mid');
				}
				if (initdata != null) {
					did = initdata.get('mycompany');
					groupid = initdata.get('groupid');
				} else {
					did = 10000;
					groupid = '88888888888888888888888888888888';
				}
				getGoodList();
				setRefreshHeader();
			});
		};
		function getGoodList() {
			api.showProgress({
				title : '数据加载中...',
				modal : false
			});
			ajaxCoCRequest('api/group/getmembercompanylist?mid=' + mid + '&did=' + did + '&groupid=' + groupid + '&pagesize=5', 'POST', '', function(ret, err) {
				if (ret) {
				
					var obj = $api.byId('txtNewsList');
					if (ret['data'] != undefined) {
						var html = '';
						if (ret.data.length != 0) {
							for (var i = 0; i < ret['data'].length; i++) {
								var thisItem = ret['data'][i];
								html += '<li><a tapmode="active" onclick="openNews(this,\'' + thisItem.n1.split(",")[3] + '\');"><div class="logo"><img src="' + thisItem.n1.split(",")[0] + '"/></div><div class="content"><h2 class="title">' + thisItem.n1.split(",")[1] + '</h2><p>' + thisItem.n1.split(",")[2] + '</p></div> </a></li>'
							}
							$api.html(obj, html);
						} else {
							html += '<li id="contentBox">您请求的数据为空</li>'
						}
					} else {
						alert("请求数据为空")
					}
					$api.html(obj, html);
					api.hideProgress();
					//init tapmode
					api.parseTapmode();
				} else {
					api.toast({
						msg : err.msg != null ? err.msg : "请求数据为空",
						location : 'middle'
					})
				}
				api.hideProgress();
			})
		}

		function openGroup(param) {
			api.openWin({
				name : 'group',
				url : 'group_list.html',
				pageParam : {
					"name" : param
				}
			})
		}

		function setRefreshHeader() {
			api.setRefreshHeaderInfo({
				visible : true,
				bgColor : '#ccc',
				textColor : '#fff',
				textDown : '下拉刷新...',
				textUp : '松开刷新...',
				showTime : true
			}, function(ret, err) {
				getGoodList();
				api.refreshHeaderLoadDone();
			});
		}

		function toDetail() {
			api.openWin({
				name : 'detail',
				url : 'win_newsDetail.html'
			})
		}

		function getStyle(obj, attr) {
			if (obj.currentStyle) {
				return obj.currentStyle[attr];
				alert(obj.currentStyle[attr])
			} else {
				return document.defaultView.getComputedStyle(obj,false)[attr];
				alert(document.defaultView.getComputedStyle(obj,false)[attr])
			}
		}*/
		function rec(){
			window.history.go(-1)
		}
	</script>
</html>